<template>
  <div class="hot">
    <div class="banner">
      <div class="mask"></div>
      <div class="pic">
        <div class="cloud"></div>
      </div>
      <p class="date">
        更新日期：{{ updataMonth > 9 ? updataMonth : "0" + updataMonth }}月{{
        updataDate1 > 9 ? updataDate1 : "0" + updataDate1
      }}日
      </p>
    </div>
    <p>
      
    </p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      updataTime: "",
      updataMonth: "",
      updataDate1: "",
    };
  },
  created() {
    this.getHotSong();
  },
  methods: {
    getHotSong() {
      this.$http("/top/list?idx=1")
        .then((res) => {
          this.updataTime = res.data.playlist.updateTime;
          let updataDate = new Date(this.updataTime);
          this.updataMonth = updataDate.getMonth() + 1;
          this.updataDate1 = updataDate.getDate();
        })
        .catch((err) => {
          console.log(err);
        });
    },
  },
};
</script>

<style scoped>
.hot .banner {
  width: 100%;
  height: 180px;
  position: relative;
  overflow: hidden;
}
.hot .mask {
  width: 100%;
  height: 180px;
  background: url(http://p2.music.126.net/GhhuF6Ep5Tq9IEvLsyCN7w==/18708190348409091.jpg);
  z-index: -1;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  background-repeat: no-repeat;
  background-size: cover;
  /* background-position: 50%; */
  filter: blur(20px);
  transform: scale(1.5);
}
.banner .pic {
  top: 25%;
  bottom: 0;
  z-index: 2;
  padding-left: 20px;
  box-sizing: border-box;
  position: relative;
}
.cloud {
  width: 168px;
  height: 78px;
  background: url(/static/img/index_icon_2x.png) no-repeat;
  background-position: -28px -33px;
  background-size: 168px 112px;
}
.date {
  margin-top: 50px;
  margin-left: 20px;
  color: #fff;
}
</style>